//
//  HWClinchDealCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/8/30.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWClinchDealCell.h"

@interface HWClinchDealCell()
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *miaoshuLabel;
@property (weak, nonatomic) IBOutlet UIImageView *icoIamehView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *jingerLabel;
@property (weak, nonatomic) IBOutlet UIView *xiantiaoLabel;
@property (weak, nonatomic) IBOutlet UILabel *jingeLabel;

@end

@implementation HWClinchDealCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.icoIamehView.layer.cornerRadius = 5;
    self.icoIamehView.layer.masksToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setDataDic:(NSDictionary *)dataDic {
    
    _dataDic = dataDic;
    self.dateLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"time"]];
    self.nameLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"name"]];
    self.miaoshuLabel.text = [NSString stringWithFormat:@"%@",dataDic[@"introduction"]];
    NSString *strUrl =  [NSString stringWithFormat:@"%@",dataDic[@"image"]];
    NSURL *url = [NSURL URLWithString:strUrl];
    [self.icoIamehView sd_setImageWithURL:url placeholderImage:nil];
    
    
    
    
    
    
}

-(void)setModel:(HWTradingModel *)model {
    
    _model = model;
    self.dateLabel.text = [NSString stringWithFormat:@"上架时间：%@",model.time];
    self.nameLabel.text = [NSString stringWithFormat:@"%@",model.name];
    self.miaoshuLabel.text = [NSString stringWithFormat:@"%@",model.introduction];
     NSString *strUrl =  [NSString stringWithFormat:@"%@",model.image];
     NSURL *url = [NSURL URLWithString:strUrl];
     [self.icoIamehView sd_setImageWithURL:url placeholderImage:nil];
    
    self.jingeLabel.text = [NSString stringWithFormat:@"￥%@",model.money];
}


-(void)setDataModel:(HWDynamicModel *)dataModel {
    
    _dataModel = dataModel;
    
    self.dateLabel.text = [NSString stringWithFormat:@"上架时间：%@",dataModel.time];
     self.nameLabel.text = [NSString stringWithFormat:@"%@",dataModel.name];
     self.miaoshuLabel.text = [NSString stringWithFormat:@"%@",dataModel.introduction];
      NSString *strUrl =  [NSString stringWithFormat:@"%@",dataModel.image];
      NSURL *url = [NSURL URLWithString:strUrl];
      [self.icoIamehView sd_setImageWithURL:url placeholderImage:nil];
    
     self.jingeLabel.text = [NSString stringWithFormat:@"￥%@",dataModel.money];
    
}

- (void)setZhanghaoModel:(HWTradingModel *)zhanghaoModel {
    _zhanghaoModel = zhanghaoModel;
    
     self.dateLabel.text = [NSString stringWithFormat:@"上架时间：%@",zhanghaoModel.time];
      self.nameLabel.text = [NSString stringWithFormat:@"%@",zhanghaoModel.name];
     self.miaoshuLabel.text = [NSString stringWithFormat:@"%@",zhanghaoModel.introduction];
      NSString *strUrl =  [NSString stringWithFormat:@"%@",zhanghaoModel.images];
      NSURL *url = [NSURL URLWithString:strUrl];
      [self.icoIamehView sd_setImageWithURL:url placeholderImage:nil];
     
     self.jingeLabel.text = [NSString stringWithFormat:@"￥%@",zhanghaoModel.money];
    
}

@end
